package ca.mcgill.mni.bic;

public class Series {
	Integer seriesNumber;
	String seriesDescription, sequenceName;
	Double echoTime, repetitionTime, inversionTime, sliceThickness;
	String phaseEncoding;
	Integer numSlices;
	
	Study parentStudy;
	
	public Series(Study parentStudy) {
		this.parentStudy = parentStudy;
	}
	
	public String getLabel() {
		String label = "" + seriesNumber + " " + seriesDescription;
		return label;
	}
	
	public static boolean isValidDescription(String description) {
		Config config = Config.singleton();
		
		for (String key : config.seriesDescriptions.keySet()) {
			for(String curDesc : config.seriesDescriptions.get(key)) {
				if(curDesc.equalsIgnoreCase(description)) {
					return true;
				}
			}
		}
	
		return false;
	}
	
	@Override
	public String toString() {
		String s = "Series: \n" +
				"SerNum: " + seriesNumber + "\n" +
				"SerDesc: " + seriesDescription +  "\n" +
				"SeqName: " + sequenceName + "\n" +
				"SliceThickness: " + sliceThickness + "\n" +
				"NumSlices: " + numSlices + "\n";
			
		return s;
	}
}
